﻿using SvnAPI.Base.Enumerator;
using SvnAPI.Command.Interface;
using System;

namespace SvnAPI.Command.Base
{
    /// <summary>
    /// Class to defines the result of a execution of a command on svn tool.
    /// </summary>
    sealed class Result : IResult
    {
        #region Properties

        /// <summary>
        /// Result type of execution.
        /// </summary>
        public ResultType ResultType { get; set; }

        /// <summary>
        /// Error from the execution.
        /// </summary>
        public String Error { get; set; }

        /// <summary>
        /// Output from the execution.
        /// </summary>
        public String Output { get; set; }

        #endregion

        #region Methods

        /// <summary>
        /// Abstract method to dispose the command executed.
        /// </summary>
        public void Dispose()
        {
            Dispose(true);
            GC.SuppressFinalize(this);
        }

        /// <summary>
        /// Dispose the object and resources.
        /// </summary>
        /// <param name="disposing"></param>
        private void Dispose(bool disposing)
        {
            if (disposing)
            {
                // Free Resources.
            }
        }

        #endregion
    }
}

